#ifndef DATAFORM_H
#define DATAFORM_H

#include <QWidget>
#include <QMdiSubWindow>
#include "pupil.h"

namespace Ui {
    class DataForm;
}

class DataForm : public QWidget
{
    Q_OBJECT

signals:
    void openResultForm(Pupil** students, int studentsCount, QString title, QStringList subjectsList);

public:
    DataForm(QWidget *parent, QString title, QStringList subjectsList, int objectCount);
    ~DataForm();

private slots:
    void calcGroupBonus(QList<Pupil*>& group, double summ, int subjectIndex, int place);
    void quickSort( Pupil** students, int l, int r, int subjectIndex);
    void on_pushButton_clicked();
    void quickSortRating( Pupil** students, int l, int r);

private:
    QStringList subjectsList;
    Ui::DataForm *ui;
};

#endif // DATAFORM_H
